package itheima.com.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.*;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class Work {
    private static final Logger LOGGER = LoggerFactory.getLogger(Work.class);
    public static void main(String[] args) throws IOException {


        ThreadPoolExecutor pool = new ThreadPoolExecutor(
                3,
                5,
                10,
                TimeUnit.SECONDS,
                new ArrayBlockingQueue<>(8),
                Executors.defaultThreadFactory(),
                new ThreadPoolExecutor.AbortPolicy());

        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("E:\\java基础加强\\就业班资料2\\05-HTML+CSS+Nginx"));

        BufferedOutputStream bos= new BufferedOutputStream(new FileOutputStream("WorkDemo//img"));

        byte[] bys = new byte[1024];
        int lin;
        while ((lin=bis.read(bys))!=-1){
            bos.write(bys,0,lin);
        }


    }
}
